package com.liu.mapper;


import com.liu.model.Classs;
import com.liu.model.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {

    //查询全部
    List<Student> selectStudent();

    //根据id查询
    Student selectStudentbyId(Integer id);

    Student selectStudentbyname(String name);

    //删除一个人
    int delectStudentId(Integer id);

    //修改一个人
    int updateStudent(@Param("Student")Student student);

    //增加一个人
    int insetIntoStudent(@Param("Student")Student  student);

    int insetIntoStudentlist(@Param("stus")List<Student> stus);

    Classs selectClassName();

    /* 注解开发 */
    @Select("select * from stu where id = #{id}")
    Student selectStubyId(Integer id);

}
